using System;
using System.Collections.Generic;

namespace Atomic.Libraries.Jobs
{
	[Serializable]
	public class ExcludedNodesOption : IJobSubmitOption
	{
		private ReadOnlyList<string> excludedNodes;

		public ExcludedNodesOption(IEnumerable<string> excludedNodes)
		{
			if (excludedNodes == null)
			{
				throw new ArgumentNullException();
			}

			this.excludedNodes = new ReadOnlyList<string>(excludedNodes);
		}

		public ExcludedNodesOption(params string[] nodes)
			: this((IEnumerable<string>)nodes)
		{
		}

		public ReadOnlyList<string> ExcludedNodes
		{
			get
			{
				return excludedNodes;
			}
		}
	}
}
